<script type="text/javascript" src="/phase2/js/userProfile.js"></script>
<div id="poContainer" class="hide" style='border: 1px solid; border-radius: 5px;border-color: #A1A1A1;width:950px;height:400px;overflow-y: auto'>
<div class="title" onclick='toggleHeaderDiv(this);'
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
><img width="5px" height="20px" src="/phase2/images/spacer.gif">Purchase Order General Details: &nbsp;&nbsp;<span
	class="throbberOff" id="newPO_activity_throbber"
></span></div>


<div>

<table border="0" cellspacing="1" cellpadding="3" style="margin-left: 10px;">
	<tr>
		<td>
		<div class="lable">Purchase Order Id<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="poNum" title="Purchase Order#"/></div>
		</td>
		<td>
		<div class="lable">Purchase Order Owner<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="po_reqby" title="Created By"	disabled/></div>
		</td>
		<td>
		<div class="lable">Create Date<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="po_createdate" title="Create Date" disabled/></div>
		</td>
		
	</tr>
	<tr>
		<td colspan="8"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td>
		<div class="lable">Purchase Order Name<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="poName" title="Purchase Order Name"
			data-validate="validate(required)"
		/></div>
		</td>
		<td>
		<div class="lable">Purchase Order Type<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 ">
			<select class="listbox" id="potype" onchange="javascript:setuppotype()";><option value="Services" selected>Services</option><option value="Goods">Goods</option></select>
		</div>
		</td>
		<td>
		<div class="lable">Supplier<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150">
			<input type="text" class="textbox findIcon2" onclick="showCompanySearchDialog(this,comp_preferred_cache,this_selectSupplier);" id="po_supplier" title="Supplier" />
			<input type="hidden" id="po_suppid"></input></div>
		</td>
		
	</tr>
	<tr>
		<td colspan="8"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	
	<tr>
		<td>	
		<div class="lable">Supplier Payment Term:</div>
		</td>
		<td>
		<div class="w150 "><select class="listbox" id='supppmtterms'><option>Select Payment Term</option></select></div>
		</td>
		
		<td>
		<div class="lable">Supplier Locations:</div>
		</td>
		<td>
		<div class="w150"><select class="listbox" id='supplocations'  size="1"><option>Select Supplier Location</option></select></div>
		</td>
	</tr>
	
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>

</div>


<div class="sub_contain">
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Line Items: <img height="10px"
	src="images/spacer.gif"
></div>
<div style="display: none;">

<div id="ctx_buyer_line_item_tbldiv" class="show" style="padding-left: 20px;">
<table cellpadding="0" cellspacing="0" border="0" id="ctx_buyer_line_item_tbl" style="width:800px;">
	<thead>
		<tr>
			<th width="20px">Select</th>
			<th width="20px">Line</th>
			<th width="80px">Description</th>
			<th width="40px">Part Number</th>
			<th width="40px">Quantity</th>
			<th width="40px">Unit of Measure</th>
			<th width="40px">Unit Price</th>
			<th width="40px">Total Price</th>
			
		</tr>
	</thead>
	<tbody>
	</tbody>
</table>
<div style="margin-left:660px;padding-top:10px;">Total Order Amount:&nbsp;<span class="redtxt" id='totalpoamt'></span></div>


</div>

<div style="padding: 20px;"><input type='button' value='Add Line Item'
	class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
	onclick="addRow('ctx_buyer_line_item_tbl')"
> <input type='button' value='Delete Line Item'
	class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
	onclick="deleteSelectedRows('ctx_buyer_line_item_tbl')"
></div>
</div>
</div>
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Billing Address:</div>
<div style="display: none;">
<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
	<tr>
		<td align="left">
		<div class="lable"><a href="javascript:void(0);" onclick="showAddressSelect('billing');">Select from Company
		Locations</a> <input type='hidden' id='b_selloc'></input></div>
		</td>
	</tr>
	<tr>
		<td>
		<div class="lable">Address Line 1<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="b_addr_line1" title="Address"
			readonly="readonly" data-validate="validate(required)"
		/></div>
		</td>
		<td>
		<div class="lable">Address Line 2:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="b_addr_line2" readonly="readonly"/></div>
		</td>
		<td>
		<div class="lable">Address Line 3:</div>
		</td>
		<td>
		<div class="w150"><input type="text" class="textbox" name="b_address_3" id="b_address_3" readonly="readonly"/></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td>
		<div class="lable">City<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="b_city" title="City"
			readonly="readonly"
		/></div>
		</td>
		<td>
		<div class="lable">State:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="b_state" readonly="readonly"/></div>
		</td>
		<td>
		<div class="lable">Zip:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="b_zip" readonly="readonly"/></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>
</div>
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Shipping Address:</div>
<div style="display: none;">
<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
	<tr>
		<td align="left">
		<div class="lable"><a href="javascript:void(0);" onclick="showAddressSelect('shipping');">Select from
		Company Locations</a> <input type='hidden' id='s_selloc'></input></div>
		</td>
	</tr>
	<tr>
		<td>
		<div class="lable">Address Line 1<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="s_addr_line1" title="Address"
			readonly="readonly"
		/></div>
		</td>
		<td>
		<div class="lable">Address Line 2:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="s_addr_line2" readonly="readonly"/></div>
		</td>
		<td>
		<div class="lable">Address Line 3:</div>
		</td>
		<td>
		<div class="w150"><input type="text" class="textbox" name="s_address_3" id="s_address_3" readonly="readonly"/></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td>
		<div class="lable">City<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="s_city" title="City"
			readonly="readonly"
		/></div>
		</td>
		<td>
		<div class="lable">State:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="s_state" readonly="readonly"/></div>
		</td>
		<td>
		<div class="lable">Zip:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="s_zip" readonly="readonly"/></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>
</div>


<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> PO Attachments and Comments</div>
<div style="display: none;">
<table>
	<tr valign="top">
		<td valign="top">
		<div id="attachmentComponetPlaceHolder_NewPO"></div>
		</td>
		<td valign="top">
		<div id="commentComponetPlaceHolder1"></div>
		</td>
	</tr>
</table>
</div>
<table align="center">
	<tr>
		<td colspan="3" align="center" class=""><input type="Submit" onClick='javascript:savepo();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Save PO"
		/> <input type="button" onClick='javascript:po_initpocreatescreen();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Cancel"
		/></td>
		
	</tr>
</table>
</div>
<!-- New PO End Here -->

<div id="ctx_poaddress_tbl_div" style="display: none">
<table cellpadding="0" cellspacing="0" border="0" id="ctx_poaddress_tbl_tbl" style="width: 370px">
	<thead>
		<tr>
			<th width="15%">Select</th>
			<th width="60%">Location</th>
		</tr>
	</thead>
	<tbody>
	</tbody>
</table>
<table>
	<tr>
		<td colspan="6" align="center" class=""><input type='hidden' id='toseladdresstype'></input> <input type="button"
			onClick='this_selectAddress();' class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
			value="Done"
		/> <input type="button" onClick="javascript:this_resetSelectAddress();"
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Reset"
		/></td>
	</tr>
</table>
</div>
<!-- List PO Start Here -->
<div id="poListContainer" class="hide" style='border: 1px solid; border-radius: 5px; border-color: #A1A1A1'>
<div class="title" onclick='toggleHeaderDiv(this);'
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Search Purchase Order: &nbsp;&nbsp;<span
	class="throbberOff" id="serachPO_activity_throbber"
></span></div>
<div>
<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
	<tr>
		<td>
		<div class="lable">PO Status<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="poStatuSerach" title="Address"
			data-validate="validate(required)"
		/></div>
		</td>
		<td>
		<div class="lable">Supplier:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="poSupplierSerach" /></div>
		</td>
		<td>
		<div class="lable">Invoice Amount:</div>
		</td>
		<td>
		<div class="w150"><input type="text" class="textbox" name="address_3" id="poInvAmtSearch" /></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td colspan='2'></td>
		<td><input type="button" onClick=''
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Search PO"
		/></td>
		<td><input type="button" onClick=''
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Clear Search"
		/></td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>
</div>
<div class="title" onclick='toggleHeaderDiv(this);'
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> View Purchase Order List: &nbsp;&nbsp;<span
	class="throbberOff" id="listPO_activity_throbber"
></span></div>
<div id="ctx_bc_po_sent_All_tbldiv" class="show" style="margin: 5px;">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="ctx_bc_po_sent_All_tbl">
	<thead>
		<tr>
			<th width="10%">PO Id</th>
			<th width="10%">Date</th>
			<th width="22%">Supplier Company</th>
			<th width="13%">Order Amt</th>
			<th width="15%">Invoiced Amt</th>
			<th width="10%">Status</th>
			<th width="15%">Owner</th>
			<th width="5%">Ver</th>
		</tr>
	</thead>
	<tbody>
	</tbody>
</table>
</div>
</div>


<!-- Open PO Start Here -->
<div id="poDetailContainer" class="hide" style='border: 1px solid; border-radius: 5px; border-color: #A1A1A1'>
	<div>
	<ul class="">
		<li><a href="#tabs-PODetails">PO Details</a></li>
		<li><a href="#tabs-POHistory">PO History</a></li>
	</ul>
	<div id="tabs-PODetails">
		<div class="title" onclick='toggleHeaderDiv(this);'	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px">
		<img width="5px" height="20px" src="/phase2/images/spacer.gif"> Select Purchase Order Number: &nbsp;&nbsp;
		<span class="throbberOff" id="newPO_activity_throbber"	></span>
	</div>
	<div>
		<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
			<tr>
				<td>
				<div class="lable">P.O. Number<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150" >
					
					<input type="text"  class="textbox findIcon" id="poNumShow" title="Purchase Order#"  onclick="showPODialog(this,posent_cache,populateSelectedPO)"/>
					
				</div>
				</td>
				
				<td>
				<div class="lable">P.O. Status<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox" id="poStatusShow" title="PO Status" /></div>
				</td>
				
				<td>
				<div class="lable">P.O. Name<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox" id="poNameShow" title="PO Name" /></div>
				</td>
				
				
			</tr>
			<tr>
				<td colspan="8"><img height="10px" src="images/spacer.gif"></td>
			</tr>
			<tr>
				<td>
				<div class="lable">P.O. Type<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox" id="poTypeShow" /></div>
				</td>
				<td>
				<div class="lable">Create Date<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox" id="poCreateDateShow" /></div>
				</td>
				<td>
				<div class="lable">P.O. Owner<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox" id="poOwnerShow" /></div>
				</td>
			</tr>
			
			<tr>
				<td colspan="8"><img height="10px" src="images/spacer.gif"></td>
			</tr>
			<tr>
				<td>
				<div class="lable">Supplier Company<span class="redtxt">*</span>:</div>
				</td>
				<td>
				<div class="w150"><input type="text" class="textbox"  id="poSupplierShow" /></div>
				</td>
				<td>
				<div class="lable">Payment Term:</div>
				</td>
				<td>
				<div class="w150 "><input type="text" class="textbox"  id="poPYShow" /></div>
				</td>
				<td>
				<div class="lable">Supplier Location:</div>
				</td>
				<td>
				<div class="w150"><input type="text" class="textbox"  id="poLocationShow" /></div>
				</td>
			</tr>
			<tr>
				<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
			</tr>
		</table>
		
	</div>
<div class="sub_contain">
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Line Items: <img height="10px"
	src="images/spacer.gif"
></div>
<div style="display: none;">
<div id="ctx_buyer_update_line_item_tbldiv" class="show" style="padding-left: 20px;">
<table cellpadding="0" cellspacing="0" border="0" id="ctx_buyer_update_line_item_tbl" style="width: 900px">
	<thead>
		<tr>
			<th width="20px">Select</th>
			<th width="20px">Line Item#</th>
			<th width="60px">Item Description</th>
			<th width="40px">Part Number</th>
			<th width="40px">Item Quantity</th>
			<th width="40px">Unit of Measure</th>
			<th width="40px">Unit Price</th>
			<th width="40px">Total Price</th>
		</tr>
	</thead>
	<tbody>
	</tbody>
</table>
</div>
<div style="padding: 20px;"><input type='button' value='Add Line Item' onclick="javascript:addLIForSelectedPO('ctx_buyer_update_line_item_tbl',null);setuppotype();">
<input type='button' value='Delete Line Item' onclick="deleteSelectedRowsForSelectedPO('ctx_buyer_update_line_item_tbl')">
</div>
</div>
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Billing Address:</div>
<div style="display: none;">
<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
	<tr>
		<td>
		<div class="lable">Address Line 1<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="addr_line1" title="Address"
			data-validate="validate(required)"
		/></div>
		</td>
		<td>
		<div class="lable">Address Line 2:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="addr_line2" /></div>
		</td>
		<td>
		<div class="lable">Address Line 3:</div>
		</td>
		<td>
		<div class="w150"><input type="text" class="textbox" name="address_3" id="address_3" /></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td>
		<div class="lable">City<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="city" title="City" data-validate="validate(required)" /></div>
		</td>
		<td>
		<div class="lable">State:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="state" /></div>
		</td>
		<td>
		<div class="lable">Zip:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="zip" /></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>
</div>
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> Shipping Address:</div>
<div style="display: none;">
<table border="0" cellspacing="1" cellpadding="3" width="90%" style="margin-left: 30px;">
	<tr>
		<td>
		<div class="lable">Address Line 1<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="addr_line1" title="Address"
			data-validate="validate(required)"
		/></div>
		</td>
		<td>
		<div class="lable">Address Line 2:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="addr_line2" /></div>
		</td>
		<td>
		<div class="lable">Address Line 3:</div>
		</td>
		<td>
		<div class="w150"><input type="text" class="textbox" name="address_3" id="address_3" /></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
	<tr>
		<td>
		<div class="lable">City<span class="redtxt">*</span>:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="city" title="City" data-validate="validate(required)" /></div>
		</td>
		<td>
		<div class="lable">State:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="state" /></div>
		</td>
		<td>
		<div class="lable">Zip:</div>
		</td>
		<td>
		<div class="w150 "><input type="text" class="textbox" id="zip" /></div>
		</td>
	</tr>
	<tr>
		<td colspan="6"><img height="10px" src="images/spacer.gif"></td>
	</tr>
</table>
</div>
<div onclick='toggleHeaderDiv(this);' class="title selected"
	style="background-color: #E8F1FA; color: #000000; margin: 5px; font-size: 12px; font-weight: bold; height: 26px"
	font=""
><img width="5px" height="20px" src="/phase2/images/spacer.gif"> PO Attachments and Comments</div>
<div style="display: none;">
<table>
	<tr>
		<td>
		<div id="attachmentComponetPlaceHolder_OpenPO"></div>
		
		<div id= "po_existingAttachmentLink"></div>
		</td>
		<td>
		<div id= "commentsComponetPlaceHolder_OpenPO"></div>
		
		<div id= "po_existingComments"></div>
		
		</td>
	</tr>
</table>
</div>
<table align="center">
	<tr>
		<td colspan="6" align="center" class=""><input type="button" onClick='updateUserProfile();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Update PO"
		/> <input type="button" onClick='updateUserProfile();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Print PO"
		/> <input type="button" onClick='updateUserProfile();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Show XML"
		/> <input type="button" onClick='resetOpenPO();'
			class=" ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" value="Cancel"
		/></td>
	</tr>
</table>
</div>
</div>

<div id="tabs-POHistory"></div>
</div>


</div>
